import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import less from 'less'
import axios from 'axios'
import VueParticles from 'vue-particles'
import 'element-ui/lib/theme-chalk/index.css'
import vueAplayer from 'vue-aplayer'
// import FullCalendar from 'vue-fullcalendar'

 
Vue.use(vueAplayer)
// Vue.use(FullCalendar)
Vue.use(less);
Vue.use(VueParticles);



//配置请求的根路径
// axios.defaults.baseURL = 'http://timemeetyou.com:8889/api/private/v1'
axios.defaults.baseURL = 'http://localhost:3000/learningSpace'
//为每一次api的请求挂载了一个autherization这么一个请求头，
// 这样那些有权限的api就可以调用成功了
axios.interceptors.request.use(config=>{
  console.log(config)
  config.headers.Authorization='Bearer ' + window.sessionStorage.getItem('token')
  return config
})
// 组件可通过this直接访问$http从而发起axios请求
Vue.prototype.$http= axios


Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
